﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class UICanvas : MonoBehaviour
{
    private List<RZUIBaseView> m_views = new List<RZUIBaseView> ();

    private Canvas m_canvas;


    private void onAddUICanvas(string tag, object[] args)
    {
        RZUIBaseView view = args[0] as RZUIBaseView;
        view.transform.SetParent (transform, false);
        m_views.Add (view);
        m_views.Sort (ComparerOrder);
    }

    private int ComparerOrder (RZUIBaseView x, RZUIBaseView y)
    {
        return x.Order.CompareTo (y.Order);
    }
}
